package cn.zxy.controller;
import cn.hutool.core.util.ArrayUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/category")
public class CategoryController {

    @GetMapping("/1")
    public ModelAndView select(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("msg","品类");
        int i = 5/0;
        mv.setViewName("category");
        return mv;
    }

    @GetMapping("/2")
    public ModelAndView select2(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("msg","品类");
        String nikeName = null;
        if (nikeName.equals("大哥的小弟")){
        }
        mv.setViewName("category");
        return mv;
    }

    @GetMapping("/3")
    public ModelAndView select3(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("msg","品类");
        Object[] objects = ArrayUtil.newArray(1);
        Object object = objects[5];

        mv.setViewName("category");
        return mv;
    }

}
